package com.jk.cxh.dao;

import com.jk.CinemaBean;
import com.jk.MovieBean;
import com.jk.MovieHallBean;
import com.jk.ProgramBean;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface PlanMovieDao {
    List<MovieHallBean> hallCount(Integer id);

    void addplay(ProgramBean program);

    MovieBean findMovies(String name);

    List<ProgramBean> queryPlan(@Param("num") String num, @Param("id") Integer id,@Param("hallId")  Integer hallId);

    List<MovieBean> queryMovie( );

    MovieBean queryMovid22(Integer movieid);

    MovieBean querymov(ProgramBean program);

    MovieBean querymov2(ProgramBean program);

    Double queryPrice(@Param("cinemaId") Integer cinemaId,@Param("movieId")  Integer movieId);
    //新增影院影片中间表
    @Insert("insert into t_movie_cinema (movieId,cinemaId,moviePrice) values (#{movie.movieId},#{cinema.cinemaId},#{movie.moviePrice})")
    void addCinemaMovie(@Param("cinema") CinemaBean cinema, @Param("movie")MovieBean movie);
}
